<?php

namespace App\Http\Controllers;

use App\Http\BizServices\AdConfigBizService;
use App\Http\Request\AdConfigListRequest;
use App\Http\Resources\AdConfigResource;
use App\Http\Rules\Auth\AuthValidate;

class AdConfigController extends BaseController
{
    public function __construct(AuthValidate $validate)
    {
        $this->validate = $validate;
    }

    public function adConfig()
    {
        $data = $this->checkParam('');
        if (isset($data['code'])) {
            return $this->jsonResponse('101', $data['message']);
        }
        $adConfigBizService = new AdConfigBizService();
        $adConfigList       = $adConfigBizService->adConfigList(new AdConfigListRequest($data));
        return self::jsonResponse('0', '', new AdConfigResource($adConfigList));
    }
}
